//
//  MBCryptor.h
//  mobion Music
//
//  Created by Vu Manh Hung on 12/28/10.
//  Copyright 2010 GNT. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CommonCrypto/CommonCryptor.h>

@interface Cryptor : NSObject 
{
    NSString	*_key;
}

@property (nonatomic, retain) NSString *key;

- (id)initWithKey:(NSString *)aKey;

/* 
 * Encrypt a string and return result in base64 encoding
 */
- (NSString *)encrypt:(NSString *)data;

/*
 * Decrypt a string in base64 encoding to a string
 */
- (NSString *)decrypt:(NSString *)data;

- (NSData *)encryptData:(NSData *)data;
- (NSData *)decryptData:(NSData *)data;

// KHOAINM
+ (NSString *)encryptedMessage:(NSString *)text byKey:(NSString *)key;

@end
